package com.example.javaee.service.impl;

import com.example.javaee.dao.GoodsMapper;
import com.example.javaee.entity.Goods;
import com.example.javaee.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName BookServiceImpl
 * @Description
 * @Author 杨理欢
 * @Date 2021/11/16 14:45
 * @Version V1.0
 */
@Service
public class GoodsServiceImpl implements GoodsService {
    @Autowired
    GoodsMapper goodsMapper;
    @Override
    public List<Goods> findAllGoods() {
        return goodsMapper.findAllGoods();
    }

    @Override
    public List<Goods> findFuzzyGoods(String keywords) {
        return goodsMapper.findFuzzyGoods(keywords);
    }

    @Override
    public int updateGoods(Goods goods) {
        return goodsMapper.updateGoods(goods);
    }

    @Override
    public int deleteGoods(int id) {
        return goodsMapper.deleteGoods(id);
    }

    @Override
    public int addGoods(Goods goods) {
        return goodsMapper.addGoods(goods);
    }

    @Override
    public List<Goods> ascAllGoods() {
        return goodsMapper.ascAllGoods();
    }

    @Override
    public List<Goods> descAllGoods() {
        return goodsMapper.descAllGoods();
    }

    @Override
    public List<Goods> wxFindAllGoods() {
        return goodsMapper.wxFindAllGoods();
    }
    @Override
    public List<Goods> wxAscAllGoods() {
        return goodsMapper.wxAscAllGoods();
    }

    @Override
    public List<Goods> wxDescAllGoods() {
        return goodsMapper.wxDescAllGoods();
    }
}
